

package lesson3.com.demo.inner.anon;


public class Twisted {
    
    private String name;
    
    public Twisted(String name){
        this.name=name;
    }
    
    public void doit(){
        new Twisted("doit"){
          void f(){
              System.out.println(name);
          }  
        }.f();
    }
    
    public static void main(String[] args){
        new Twisted("main").doit();
    }

}
